package com.tss.model;

import java.time.LocalDateTime;

/**
 * 交易记录实体类
 */
public class TransactionRecord {
    private int id;                 // 交易ID
    private String destCode;        // 目的地代码
    private String ticketType;      // 车票类型名称
    private double amount;          // 交易金额
    private String paymentMethod;   // 支付方式（现金卡/硬币/纸币）
    private LocalDateTime time;     // 交易时间
    private boolean isCancelled;    // 是否取消
    
    public TransactionRecord() {
        this.time = LocalDateTime.now();
        this.isCancelled = false;
    }
    
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public String getDestCode() {
        return destCode;
    }
    
    public void setDestCode(String destCode) {
        this.destCode = destCode;
    }
    
    public String getTicketType() {
        return ticketType;
    }
    
    public void setTicketType(String ticketType) {
        this.ticketType = ticketType;
    }
    
    public double getAmount() {
        return amount;
    }
    
    public void setAmount(double amount) {
        this.amount = amount;
    }
    
    public String getPaymentMethod() {
        return paymentMethod;
    }
    
    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }
    
    public LocalDateTime getTime() {
        return time;
    }
    
    public void setTime(LocalDateTime time) {
        this.time = time;
    }
    
    public boolean isCancelled() {
        return isCancelled;
    }
    
    public void setCancelled(boolean cancelled) {
        isCancelled = cancelled;
    }
} 